<!DOCTYPE html>
<!--
Author: zouy
Unit: D9lab
Date: 2017-11-03 19:46 
-->
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>chat</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcss.com/angular.js/1.4.6/angular.min.js"></script>
    <!--viewer-->
    <!--<link href="css/viewer.min.css" rel="stylesheet">
    <script src="js/viewer.js"></script>-->
    <!--nim-->
    <script src="nim/NIM_Web_NIM_v4.3.0.js"></script>
    <!--my-js-->
    <script src="js/chat.js"></script>
    <style>
        /**点击图片放大显示***/
        .popup {
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            text-align: center;
            display: none;
            z-index: 2501;
        }
        .popup .popup-bg {
            background-color: rgba(0, 0, 0, 0.5);
            width: 100%;
            height: 100%;
        }
        .popup img {
            max-width: 100%;
            max-height: 100%;
        }
    </style>
</head>
<body ng-app="m" ng-controller="c">
<span ng-bind="test"></span>
<div class="container">
    <div class="row">
        <!--用户1-->
        <div class="col-md-12">
            <h3>用户:&nbsp;<span style="color:#ff3833;">test01</span>&nbsp;
                状态: <span ng-bind="loginStatus" ng-style="{'color':loginStatus=='在线'?'green':'grey'}"></span>
                <button ng-show="loginStatus=='离线'" ng-click="login()" class="btn btn-success pull-right">登录</button>
                <button ng-show="loginStatus=='在线'" ng-click="logout()" class="btn btn-danger pull-right">注销</button>
            </h3>
            <!--聊天-->
            <div style="margin-top: 20px;">
                <div class="row">
                    <div class="col-xs-6">
                        <span class="text-muted">输入区域:</span>
                        <textarea ng-model="infoObj.userOne.text" class="form-control" rows="10" cols="10"
                                  style="outline: none;resize: none;" ng-disabled="loginStatus=='离线'"></textarea>
                    </div>
                    <div class="col-xs-6" id="imgViewer">
                        <span class="text-muted">历史消息:</span>
                        <div id="msgDivId" style="max-height: 210px;overflow: auto;border: 1px solid grey;">
                            <div ng-repeat="x in msgList">
                                <div>来自:<span ng-bind="x.from" style="color: orangered;"></span>&nbsp;
                                    <span ng-bind="x.time | date:'yyyy-MM-dd HH:mm:ss'"></span></div>
                                <div>
                                    <p ng-if="x.type=='text'" ng-bind="x.text"></p>
                                    <img ng-if="x.type=='image'" ng-src="{{x.file.url}}"
                                         ng-click="imgClick(x.file.url)" alt="" width="100" height="60">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div style="margin-top: 20px;">
                    <div class="form-inline">
                        <label>选择发送对象
                        <select ng-model="infoObj.userOne.to" class="form-control"
                                ng-options="x for x in toUser"></select>
                        </label>
                    </div>
                    <button ng-click="infoObj.userOne.text=''" class="btn btn-default" ng-disabled="loginStatus=='离线'">清空</button>
                    <button ng-click="preSend()" class="btn btn-success" ng-disabled="loginStatus=='离线'">发送</button>
                    <button onclick="fileUpload.click()" class="btn" ng-disabled="loginStatus=='离线'">
                        <i style="cursor: pointer;" class="icon-picture icon-2x"></i></button>
                    <input type="file" accept="image/png;image/jpg" id="fileUpload"
                        onchange="changeInput()" style="display: none;">
                </div>
            </div>
        </div>
    </div>
    <!--联调专用-->
    <!--<table class="table" style="margin-top: 20px;">
        <thead>
            <th>状态</th><th>账号</th><th>密码</th>
        </thead>
        <tbody>
            <tr ng-repeat="x in toLTUser">
                <td><span>离线</span></td>
                <td><span ng-bind="x.accid"></span></td>
                <td><span ng-bind="x.token"></span></td>
            </tr>
        </tbody>
    </table>-->
</div>
<div class="container" >
    <div class="row"><br>
        <div class="col-md-12">上传进度:
            <div class="progress">
                <div id="proId" class="progress-bar progress-bar-success" role="progressbar"
                     aria-valuemin="0" aria-valuemax="100"
                     style="width: 0%;">
                    <span>0</span>%
                </div>
            </div>
        </div>
        <div >
            <div class="col-md-6"><h4>原图</h4>
                <img width="500px" height="300px" id="imgContent-yuan" src="" alt=""></div>
            <div class="col-md-6"><h4>压缩图</h4>
                <img width="500px" height="300px" id="imgContent" src="" alt=""></div>
        </div>
    </div>
</div>
<div class="fullScreen"></div>
<script>
    //test
    var _t = {
        accid:"1",token:"23"
    };
    var p = $.extend({},_t,{accid:"222"});
    console.log(p);
</script>
</body>
</html>